package com.broadengate.view.pageModel;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * 收入详情
 * 
 * @author  lcs
 * @version  [版本号, 2014年12月26日]
 * @see  [相关类/方法]
 * @since  [产品/模块版本]
 */
public class IncomeDetail implements java.io.Serializable
{
    /**
     * 页面树结构分级标志位
     */
    private String pid;
    
    /**
     * 收入所属年份
     */
    private String incomeYear;
    
    /**
     * 收入所属部门
     */
    private String departmentName;
    
    /**
     * 收入所属部门ID
     */
    private int departmentId;
    
    /**
     * 收入名称
     */
    private String incomeName;
    
    /**
     * 收入合计
     */
    private float incomeValue;
    
    /**
     * 匹配合同有效金额
     */
    private float contractValue;
    
    /**
     * 回款金额
     */
    private float billValue;
    
    /**
     * 有此部门权限的人员列表
     */
    private String owners;
    
    /**
     * 是否为最后一层树枝默认true
     */
    private String lowestBranch = "true";
    
    /**
     * 一月收入
     */
    private float incomeJanuary;
    
    /**
     * 二月收入
     */
    private float incomeFebruary;
    
    /**
     * 三月收入
     */
    private float incomeMarch;
    
    /**
     * 四月收入
     */
    private float incomeApril;
    
    /**
     * 五月收入
     */
    private float incomeMay;
    
    /**
     * 六月收入
     */
    private float incomeJune;
    
    /**
     * 七月收入
     */
    private float incomeJuly;
    
    /**
     * 八月收入
     */
    private float incomeAugust;
    
    /**
     * 九月收入
     */
    private float incomeSeptember;
    
    /**
     * 十月收入
     */
    private float incomeOctober;
    
    /**
     * 十一月收入
     */
    private float incomeNovember;
    
    /**
     * 十二月收入
     */
    private float incomeDecember;
    
    /**
     * 下一级目录
     */
    private List<IncomeDetail> children;
    
    public String getPid()
    {
        return pid;
    }
    
    public void setPid(String pid)
    {
        this.pid = pid;
    }
    
    public String getIncomeYear()
    {
        return incomeYear;
    }
    
    public void setIncomeYear(String incomeYear)
    {
        this.incomeYear = incomeYear;
    }
    
    public String getIncomeName()
    {
        return incomeName;
    }
    
    public void setIncomeName(String incomeName)
    {
        this.incomeName = incomeName;
    }
    
    public float getIncomeValue()
    {
        return incomeValue;
    }
    
    public void setIncomeValue(float incomeValue)
    {
        this.incomeValue = incomeValue;
    }
    
    public float getContractValue()
    {
        return contractValue;
    }
    
    public void setContractValue(float contractValue)
    {
        this.contractValue = contractValue;
    }
    
    public float getBillValue()
    {
        return billValue;
    }
    
    public void setBillValue(float billValue)
    {
        this.billValue = billValue;
    }
    
    public float getIncomeJanuary()
    {
        return incomeJanuary;
    }
    
    public void setIncomeJanuary(float incomeJanuary)
    {
        this.incomeJanuary = incomeJanuary;
    }
    
    public float getIncomeFebruary()
    {
        return incomeFebruary;
    }
    
    public void setIncomeFebruary(float incomeFebruary)
    {
        this.incomeFebruary = incomeFebruary;
    }
    
    public float getIncomeMarch()
    {
        return incomeMarch;
    }
    
    public void setIncomeMarch(float incomeMarch)
    {
        this.incomeMarch = incomeMarch;
    }
    
    public float getIncomeApril()
    {
        return incomeApril;
    }
    
    public void setIncomeApril(float incomeApril)
    {
        this.incomeApril = incomeApril;
    }
    
    public float getIncomeMay()
    {
        return incomeMay;
    }
    
    public void setIncomeMay(float incomeMay)
    {
        this.incomeMay = incomeMay;
    }
    
    public float getIncomeJune()
    {
        return incomeJune;
    }
    
    public void setIncomeJune(float incomeJune)
    {
        this.incomeJune = incomeJune;
    }
    
    public float getIncomeJuly()
    {
        return incomeJuly;
    }
    
    public void setIncomeJuly(float incomeJuly)
    {
        this.incomeJuly = incomeJuly;
    }
    
    public float getIncomeAugust()
    {
        return incomeAugust;
    }
    
    public void setIncomeAugust(float incomeAugust)
    {
        this.incomeAugust = incomeAugust;
    }
    
    public float getIncomeSeptember()
    {
        return incomeSeptember;
    }
    
    public void setIncomeSeptember(float incomeSeptember)
    {
        this.incomeSeptember = incomeSeptember;
    }
    
    public float getIncomeOctober()
    {
        return incomeOctober;
    }
    
    public void setIncomeOctober(float incomeOctober)
    {
        this.incomeOctober = incomeOctober;
    }
    
    public float getIncomeNovember()
    {
        return incomeNovember;
    }
    
    public void setIncomeNovember(float incomeNovember)
    {
        this.incomeNovember = incomeNovember;
    }
    
    public float getIncomeDecember()
    {
        return incomeDecember;
    }
    
    public void setIncomeDecember(float incomeDecember)
    {
        this.incomeDecember = incomeDecember;
    }
    
    public List<IncomeDetail> getChildren()
    {
        return children;
    }
    
    public void setChildren(List<IncomeDetail> children)
    {
        this.children = children;
    }
    
    public String getDepartmentName()
    {
        return departmentName;
    }
    
    public void setDepartmentName(String departmentName)
    {
        this.departmentName = departmentName;
    }
    
    public int getDepartmentId()
    {
        return departmentId;
    }
    
    public void setDepartmentId(int departmentId)
    {
        this.departmentId = departmentId;
    }
    
    public String getLowestBranch()
    {
        return lowestBranch;
    }
    
    public void setLowestBranch(String lowestBranch)
    {
        this.lowestBranch = lowestBranch;
    }
    
    
    public String getOwners()
    {
        return owners;
    }

    public void setOwners(String owners)
    {
        this.owners = owners;
    }

    /**
     * 获取此收入树的最后 一层枝桠
     * <功能详细描述>
     * @return [参数说明]
     * 
     * @return IncomeDetail [返回类型说明]
     * @exception throws [违例类型] [违例说明]
     * @see [类、类#方法、类#成员]
     */
    public void getLowestBranchList(List<IncomeDetail> result,IncomeDetail incomeDetail)
    {
        if ("true".equals(incomeDetail.getLowestBranch()))
        {
            result.add(incomeDetail);
        }else
        {
            List<IncomeDetail> children = incomeDetail.getChildren();
            for (IncomeDetail incomeDetail2 : children)
            {
                if ("true".equals(incomeDetail.getLowestBranch()))
                {
                    result.add(incomeDetail2);
                }else
                {
                     this.getLowestBranchList(result, incomeDetail2);
                }
            }
        }
    }
    
   
}
